#include <iostream>
#include <cstdio>
using namespace std;
char c;
double ans = 0, n = 0;
int main()
{
    cin >> c >> n;
    if (c == 'A')
        printf("%.2f", n * 19.99);
    else if (c == 'B')
        printf("%.2f", n * 17.99);
    else if (c == 'C')
        printf("%.2f", n * 15.99);
    else if (c == 'D')
        printf("%.2f", n * 11.99);
    else
        printf("No avialable.");
}